<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="技术服务费记录">
                    <#include "banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">
                            <div class="toolbor-module export">
                                <input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
                            </div>
                            <div class="toolbor-module export">
                                <div class="formTit">&nbsp;&nbsp;&nbsp;服务费总额：${sum!''}元 </div>
                            </div>
                            <div class="toolbor-module search">
                                <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                            </div>

                            <div class="toolbor-module search">
                                <div class="formTit">资产管理公司：</div>
                                <select id="fid">
                                    <option value="">全部</option>
                                    <#if fList??>
                                        <#list fList as item>
                                            <option value="${item.id?c}">${item.name}</option>
                                        </#list>
                                    </#if>
                                </select>
                            </div>

                            <div class="toolbor-module search">
                                <div class="formTit">添加时间：</div>
                                <input class="_search-value" name="dotime1" id="dotime1" value="${dotime1!}" onclick="change_picktime()"/>
                                <div class="formTit"> 到 </div>
                                <input class="_search-value" name="dotime2" value="${dotime2!}" id="dotime2" onclick="change_picktime()"/>
                            </div>
                        </div>
                        <!--工具栏--}-->

                        <div id="main" class="clearfix">
                            <form action="" method="post">
                                <table class="data-list">
                                    <tr class="header">
                                        <td>ID</td>
                                        <td>资产管理公司</td>
                                        <td>类型</td>
                                        <td>费用</td>
                                        <td>添加时间</td>
                                    </tr>
                                    <#list list as item>
                                        <tr class="s">
                                            <td>${item.id!''}</td>
                                            <td>${item.franchiseeName!''}</td>
                                            <td>技术服务费</td>
                                            <td>${item.fee!''}元</td>
                                            <td>${item.addTime!''}</td>
                                        </tr>
                                    </#list>
                                </table>
                            </form>
                            <!--底部工具栏--{-->
                            <div id="bottomToolbar" class="clearfix">
                                <div class="other-tool">
                                    <dl class="refresh-data">
                                        <dt class="refresh-data-icon"></dt>
                                        <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                    </dl>
                                </div>

                                <!--翻页系统--{-->
                                <div class="container s_formPage">
                                    <#import "../../common/page.html" as pager>
                                        <@pager.pagination page=page url="${pageUrl}" map=param style="style1"  />
                                </div>
                                <!--翻页系统--}-->
                            </div>
                            <!--底部工具栏--}-->

                            <script>
                                var url = '?search=true';
                                var xlsurl = '?type=export';


                                function QueryString()
                                {
                                    var name,value,i;
                                    var str=location.href;
                                    var num=str.indexOf("?")
                                    str=str.substr(num+1);
                                    var arrtmp=str.split("&");
                                    for(i=0;i < arrtmp.length;i++){
                                        num=arrtmp[i].indexOf("=");
                                        if(num>0){
                                            name=arrtmp[i].substring(0,num);
                                            value=arrtmp[i].substr(num+1);
                                            this[name]=value;
                                        }
                                    }
                                }

                                function fnInitSelect(){
                                    var Request=new QueryString();
                                    var fid=Request['fid'];
                                    if(fid){
                                        $("#fid").val(fid)
                                    }
                                }

                                fnInitSelect();

                                function sousuo(){
                                    var sou = "";
                                    var fid = $("#fid").find("option:selected").val();
                                    if(fid!=null&&fid!=""&&fid!="undefine"){
                                        sou += "&fid="+fid;
                                    }
                                    var dotime1 = $("#dotime1").val();
                                    var dotime2 = $("#dotime2").val();
                                    if (dotime1!=null){
                                        sou += "&dotime1="+dotime1;
                                    }
                                    if (dotime2!=null){
                                        sou += "&dotime2="+dotime2;
                                    }
                                    if (sou!=""){
                                        location.href=url+sou;
                                    }
                                }
                                function exportxls(){
                                    var num='${(page.total)?c}';
                                    num=num.replace(",","");
                                    if(num>30000){ //条数自己定义，但必须小于65536
                                        alert("数据过多，请选择指定的时间进行数据查询导出！"); //提示信息根据不同的内容注意修改下。
                                        return false;
                                    }
                                    var sou = "";
                                    var fid = $("#fid").find("option:selected").val();
                                    if(fid!=null&&fid!=""&&fid!="undefine"){
                                        sou += "&fid="+fid;
                                    }
                                    var dotime1 = $("#dotime1").val();
                                    var dotime2 = $("#dotime2").val();
                                    if (dotime1!=null){
                                        sou += "&dotime1="+dotime1;
                                    }
                                    if (dotime2!=null){
                                        sou += "&dotime2="+dotime2;
                                    }
                                    if (sou!=""){
                                        location.href=xlsurl+sou;
                                    }else{
                                        location.href=xlsurl;
                                    }
                                }
                            </script>
                        </div>
        </div>
    </div>
    <div class="mc-b"><#include "../foot.html"></div>
    <#include "../jsPage.html">
    </body>
</html>

